public class ComponentLeaf extends Component{


    public ComponentLeaf(String componentName){
        super(componentName);
    }
    @Override
    public boolean addChild(Component child) {
        return false;
    }

    @Override
    public boolean removeChild(Component child) {
        return false;
    }

    @Override
    public Component getChild(Integer childIndex) {
        return null;
    }

    @Override
    public void operation() {
        System.out.println("叶子节点:"+getComponentName());
    }
}
